<!doctype html>
<html>
<head>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0">
<title>爱车课堂</title>
<link href="../../css/newStyle.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="../../js/jquery-1.4.2.js"></script>
<script type="text/javascript" src="../../js/common.js"></script>
<script type="text/javascript" src="../../js/gbRst.js"></script>
<script type="text/javascript" src="../../js/utils.js"></script>
<script type="text/javascript" src="../../js/openId.js"></script>
<script type="text/javascript" src="../../js/header&footer.js"></script>
<script type="text/javascript" src="../../js/carService.js"></script>
<script type="text/javascript" src="../../js/ad.js"></script>
<script type="text/javascript" src="../../js/swipe.js"></script>
<script type="text/javascript" src="../../js/qmsk-1.1.js"></script>
<script type="text/javascript" src="../../js/addReadNum.js"></script>
<script type="text/javascript">
var _keyWord='';
var _title = '';
$(function(){
	$("#title").val("请输入关键字");
	loadAd("banner", 7)
	
	$.ajax({
		url:'../../../carLesson/find/typeList',
		type:'get',
		async:false,
		data:{'typeId':7,'shopId':_shopId},
		success:function(data){
			var dt = JSON.parse(data);
			 if(dt.state==0){
				var htm="<option value=''>筛选</option>"
				for(var i=0;i<dt.result.data.length;i++){
					var keyword = getHtmlString(getHeadIndexValue(i, dt, "keyword"));
					if(IsNotEmpty(keyword)){
						
					 htm+="<option value='"+keyword+"'>"+keyword+"</option>"
					}
				}
				$("#select").html(htm)
				
			} 
format("shopInside","28","26","14","12");
		}
	});
	getinfo();
	$("#select").change(function() {
		getinfo();
	})
})
function getinfo(){
	var _keyWord = $("#select").val()
	var _title=$("#title").val();
	if(_title=="请输入关键字"){
		_title='';
	}
	$("#info").empty()
	 new qmsk.SiglePinterest({
			url : '../../../carLesson/find/adList', // 请求地址，插件会自动在 url 后追加 /n/n
			initPage : 1, // 首次加载页数
			size : 5, // 每次加载数量，即每页的大小
			success : printDataToPage, // 成功回调
			valves : 100 ,//当滚动条距离底部该像素的时候加载
			data:{'typeId':7,'shopId':_shopId,'keyWord':_keyWord,'title':_title},
			loading : addRefresh,
			loaded : delRefresh
		});
}
function printDataToPage(dt) {
	var htm="";
	for ( var i = 0; i < dt.row; i++) {
		var index= dt.getValue("indexUrl",i) 
		var flag= false;
		if(IsEmpty(index)){
			flag=true
		}
		var keyWord=dt.getValue("keyWord",i);
		if(IsNotEmpty(keyWord)){
			keyWord = "["+keyWord+"]";
		}
	 htm+="<dl onclick=\"toS("+dt.getValue("id",i)+","+flag+",\'"+index+"\')\" class=\"shopInside news\"><dt><img src=\""+dt.getValue("imageUrl",i)+"\"></dt><dd><strong class=\"title\"><span>"+keyWord+"</span>"+dt.getValue("title",i)+"</strong><p>"+dt.getValue("memo",i)+" </p><div class='overDate'><span>"+dt.getValue( "createdTime",i).substring(0,10)+ "</span> | <span>"+dt.getValue("subMan",i)+"</span> | <span class='red'>"+dt.getValue("number",i)+"</span>浏览</div></dd></dl>"
	}
	$("#info").append(htm)
	format("shopInside","28","26","28","26");

} 

function toS(id,flag,url){
	if(flag){
		return false;
	}else{
		_addReadNmber(id, url);
	}
}
</script>
</head>

<body>
<div class="wrapper scrollBar">
  <div class="container">
  	<!--广告-->
    <div id='banner' class='swipe'>
      <!-- <div class='swipe-wrap'>
        <div class="ad"><img src="../../images/ban1.jpg" />
          <p>会员</p>
        </div>
        <div class="ad"><img src="../../images/ban2.jpg" />
          <p>俱乐部</p>
        </div>
        <div class="ad"><img src="../../images/ban3.jpg" />
          <p>优惠券</p>
        </div>
      </div> -->
    </div>
    <!--广告over-->
    <div class="searchCar"><div class="newCarType"><select id="select"> </select><img src="../../images/menu.png"></div><div class="search"><input id="title" type="text" value="请输入关键字" onFocus="if(this.value==defaultValue)this.value=''" onblur="if(this.value=='')this.value='请输入关键字'"><span class="searchBtn" onclick="getinfo()"></span></div>
</div>
    <div id="info"> 
      <!-- <dl class="shopInside news">
    	<dt><img src="../../images/img1.jpg"></dt>
        <dd>
        	<strong class="title"><span>[维修]</span>一汽大众一汽大众一汽大众</strong>
            <p>酿造拉菲酒的苛刻标准使拉菲副牌红具有了与正牌相近的品质。浓郁的果味使其口感温和特久，带有顺滑、典雅、柔和的单宁，相当平衡，回味悠长，有着独特的个性。</p>
        </dd>
    </dl> -->
  </div>
</div>
</div>
<script type="text/javascript">
</script>
</body>
</html>
